import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: mac
 * Date: 2022-09-16
 * Time: 15:13
 */
class Student{
    private String name;
    private String classes;
    private double score;

    public Student(String name, String classes, double score) {
        this.name = name;
        this.classes = classes;
        this.score = score;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getClasses() {
        return classes;
    }

    public void setClasses(String classes) {
        this.classes = classes;
    }

    public double getScore() {
        return score;
    }

    public void setScore(double score) {
        this.score = score;
    }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", classes='" + classes + '\'' +
                ", score=" + score +
                '}';
    }
}
public class TestDemo {
    public static void main(String[] args) {
        ArrayList<Character> arrayList = new ArrayList<>();
        String str1 = "welcome to bit";
        String str2 = "come";
        /*char[] ret1 = str1.toCharArray();
        char[] ret2 = str2.toCharArray();
        for (int i = 0; i < ret1.length; i++) {
            for (int j = 0; j < ret2.length; j++) {
                if (ret1[i] == ret2[j]){
                    ret1[i] = 0;
                    break;
                }
            }
        }*/
        for (int i = 0; i < str1.length(); i++) {
            char ret = str1.charAt(i);
            if (!str2.contains(ret + "")){
                arrayList.add(ret);
            }
        }
        for (char ch:arrayList
             ) {
            System.out.print(ch);
        }
    }
    public static void main2(String[] args) {
        ArrayList<Integer> integers = new ArrayList<>();
        integers.add(1);
        integers.add(2);
        integers.add(3);
        //作业1 - 看Collections包的方法
        Collections.sort(integers);//集合框架方法 - 排序
        Collections.reverse(integers);//集合框架方法 - 逆置
        System.out.println(integers);
    }

    public static void main1(String[] args) {
        ArrayList<Student> students = new ArrayList<>();
        students.add(new Student("张三","106-2",98.9));
        students.add(new Student("李四","107-2",88.6));
        students.add(new Student("王麻子","108-2",93.4));

        System.out.println(students);
    }
}
